Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
How to generate date time format in Javascript same as ""Wed Dec 08 2021 19:05:48 GMT+0000 (Coordinated Universal Time)"

I'm using moment.js to generate a date time string in NodeJS, but I don't know how to make it include (Coordinated Universal Time) at the end. Please help me. Thanks!

const moment = require('moment');

console.log(moment.utc().toString()); 
// result: Wed Mar 16 2022 11:07:40 GMT+0000 
// not include (Coordinated Universal Time)
// Expected: Wed Mar 16 2022 11:07:40 GMT+0000 (Coordinated Universal Time)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just add (Coordinated Universal Time) at the end of the string logged:

const moment = require('moment');

console.log(`${moment.utc().toString()} (Coordinated Universal Time)`);
// => Wed Mar 16 2022 11:07:40 GMT+0000 (Coordinated Universal Time)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!